import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../views/Home.vue'
import index from "../layout/index.vue"
import SongList from "../components/SongList";
import Mine from "../components/Mine";
import Search from "../components/Search";
import Singer from "../components/Singer";
import SongDetails from "../components/SongDetails";
import singerDetails from "../components/singerDetails";

Vue.use(VueRouter)


const routes = [
  {
    path: '/',
    name: 'index',
    component: index,
    children:[
      {
        path:"",
        component:home
      },
      {
        path: "Singer",
        component: Singer
      },
      {
        path: "SongList",
        component: SongList
      },
      {
        path: "Mine",
        component: Mine
      },
      {
        path:"Search",
        component: Search
      },
      {
        path:"singerDetails",
        component: singerDetails
      },
      {
        path:"ListListDetail",
        component:()=>import ("../components/ListListDetail")
      },
      {
        path:"More",
        component:()=>import("../components/More")
      }
    ]

  },
  {
    path:"/SongDetails",
    component: SongDetails
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
